<template>
	<view class="profile">
		<view class="toubu">
			<image src="http://assessgeek.oss-cn-hangzhou.aliyuncs.com/upload/20200722/0ada6808ebb97bd02beb1efa328597e7e135d1ff.png"
			 mode="scaleToFill" style="width: 750rpx; height: 520rpx;"></image>
		</view>
		<text class="mytxt">我的</text>
		<view class="personal">
			<view class="imgs">
				<image :src="image_url" mode="scaleToFill" style="width: 100rpx; height: 100rpx;"></image>
			</view>
			<view class="info">
				<text>{{user_name}}</text>
			</view>
		</view>

		<view class="list">
			<view v-for="(item,index) in list" :key="item.id" @click="jump(index)">
				<text>{{item}}</text>
				<text class="iconfont icon-jiantou"></text>
			</view>
		</view>

		<view class="backjintu">
			<image src="http://assessgeek.oss-cn-hangzhou.aliyuncs.com/upload/20200722/67b3882cd5860792652d343d4ffe8ebec4431efb.png"
			 mode="scaleToFill" style="width: 689rpx; height: 300rpx;"></image>
		</view>

		<view class="bottomTab">
			<view class="msg1" @click="jumpMsg">
				<image src="../../../../static/image/doctor/info.png" mode="scaleToFill" style="width: 40rpx; height: 40rpx;"></image>
				<text>消息</text>
			</view>
			<view class="my1">
				<image src="../../../../static/image/doctor/my1.png" mode="scaleToFill" style="width: 40rpx; height: 40rpx;"></image>
				<text>我的</text>
			</view>
		</view>

	</view>
</template>

<script>
	import doctorTab from "@/components/doctorTab/doctorTab.vue";
	export default {
		components: {
			doctorTab
		},
		onShow() {
			// 隐藏首页的问题
			this.image_url = this.$store.state.userinfo.user_url;
			this.user_name = this.$store.state.userinfo.user_name;
		},
		data() {
			return {
				image_url: null,
				user_name: null,
				actives: '1',
				path1: "../../homePage3/homePage3",
				backgroundColor: "transparent",
				list: ["我的资料", "我加入的诊所"],
				path: null
			};
		},
		methods: {
			jump(index) {
				switch (index) {
					case 0:
						this.path = "../person/person";
						break;
					case 1:
						this.path = "../myClinic2/myClinic2";
						break;
				};
				uni.navigateTo({
					url: this.path,
				});
			},
			changeState() {
				this.personal.state = !this.personal.state;
			},
			jumpMsg() {
				uni.redirectTo({
					url: "../msg/msg"
				});
			},
		}
	}
</script>

<style lang="scss">
	page {
		width: 100%;
		height: 100%;
	}

	.profile {
		width: 100%;
		height: 100%;
		background-color: $uni-beijingyangse;
		position: relative;
		padding: 0 30rpx;
	}

	.toubu {
		position: fixed;
		top: 0;
		left: 0;
		width: 750rpx;
		height: 520rpx;
	}

	.mytxt {
		position: fixed;
		top: 95rpx;
		left: 30rpx;
		font-size: 34rpx;
		font-family: PingFang SC;
		font-weight: 400;
		color: rgba(255, 255, 255, 1);
	}

	.personal {
		width: 750rpx;
		height: 110rpx;
		position: absolute;
		z-index: 3;
		top: 210rpx;
		left: 0rpx;
		padding-left: 30rpx;
		display: flex;
		align-items: center;

		.imgs {
			width: 100rpx;
			height: 100rpx;
			margin-right: 35rpx;

			image {
				width: 100rpx;
				height: 100rpx;
				border-radius: 50%;
				border: 4rpx solid #FFFFFF;
				border-radius: 50%;
			}
		}

		.info {
			height: 100%;
			display: flex;
			align-items: center;

			>text {
				font-size: 36rpx;
				font-family: PingFang SC;
				font-weight: 500;
				color: rgba(255, 255, 255, 1);
				line-height: 32rpx;
			}
		}
	}

	.list {
		@include shuiping;
		top: 377rpx;
		border-radius: 20rpx;
		z-index: 4;
		width: 689rpx;
		height: 211rpx;
		display: flex;
		flex-wrap: wrap;
		padding: 20rpx 40rpx;
		background-color: #FFFFFF;

		>view {
			width: 100%;
			@include chuizhilianduan;

			&:first-of-type {
				border-bottom: 1rpx solid #E4E4E5;
			}
		}
	}

	.bottomTab {
		width: 750rpx;
		height: 100rpx;
		background-color: #FFFFFF;

		.my1 {
			>text {
				color: #2DD1BC;
			}
		}
	}

	.backjintu {
		@include shuiping;
		top: 630rpx;
		width: 689rpx;
		height: 300rpx;

		image {
			border-radius: 10rpx;
		}
	}
</style>
